<?php
  $song = str_replace(".mp3", "", "$_GET[song]");
  $song = str_replace('_', ' ', $song);
 
  include('./init.php');
  
  $res = mysql_query("SELECT id_file,file_name FROM bj_audio WHERE file_title='". mysql_real_escape_string($_GET['song']) . "'");
  if ($res !== FALSE && mysql_num_rows($res)) {
    $lin = mysql_fetch_row($res);
    mysql_query("UPDATE traffic_stats SET item_views=item_views+1 WHERE item_id='{$lin[0]}'") or die(mysql_error());
  } else {
    header('Location: ./notfound.html');
    exit;
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> Theme Song </title>
<meta name="description" content="TV Theme music and songs from 7,856 different television shows. Listen to them all in MP3 format." />
<meta name="keywords" content="<?php echo str_replace('.mp3', '', $lin[1]);?> theme song, <?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?> theme music, <?php echo str_replace('.mp3', '', $lin[1]); ?>s music, TV Theme songs, television songs, tv tunes"/>
<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/email.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS latest songs" href="http://www.televisiontunes.com/rss.php" />
<script language="JavaScript" type="text/javascript" src="js/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript">
/* 
Script made by Martial Boissonneault � 2001-2006 http://getElementById.com
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
var ie5 = (document.getElementById && document.all); 
var ns6 = (document.getElementById && !document.all);

var nextNews = 0;

function displayNews(){

var news = document.getElementById('cont').getElementsByTagName('DIV');
var objs = document.getElementById('cont');

	if(ie5 && !window.opera){
		objs.style.filter = "blendTrans(Duration=0.7)"
		objs.filters[0].Apply();
		objs.style.visibility = "visible";
		objs.filters[0].Play();
	}
	else if(ns6){
		objs.style.visibility = "visible";
	}

	if(ie5 || ns6){
		for(var i=0; i<news.length; i++){
			news[i].style.visibility = "hidden";
		}
		news[nextNews++].style.visibility = "visible";
		nextNews=nextNews%news.length;
	}
}
setInterval("displayNews()",6000);
</script>
<style type="text/css">
<!--
.style4 {font-size: 12px}
-->
</style>
</head>
<body onload="displayNews()">
<?php include('blocks/google-analytics.php'); ?>
<div id="wrap">
	<div id="header">
		<?php include('blocks/header.php'); ?>
		<ul>
			<li><a href="index.php">Home</a></li>
			<li><a href="browse.php">Index</a></li>
			<li><a href="game.php">Game</a></li>
			<li><a href="missing-songs.php">Wanted</a></li>
			<li><a href="links.php">Links</a></li>
			<li><a href="search.php">Search</a></li>
			<li><a href="copyright.php">Legal</a></li>
			<li><a href="contact.php">Contact</a></li>
		</ul>
	</div>
	<div id="content-wrap">
		<div style="text-align: center;">
			<br />
			<?php include('blocks/ads_leaderboard.php');?>
		</div>
		<div id="main">
			<table border="0" width="100%" align="center">
				<tr>
					<td colspan="2" align="center">
						<?php include('blocks/latestNews.php'); ?>
					</td>
				</tr>
				<tr><td height="5"></td></tr>
				<tr>
					<td width="52%" align="center" valign="top">
						<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td class="text_flash"><?php echo htmlspecialchars(str_replace('.mp3', '', stripslashes($lin[1]))); ?><br /> Theme Song</td>
								</tr>
								<tr><td height="15"></td></tr>
								<tr>
									<td align="center">
										<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="269" height="56" id="Mp3" align="middle">
								    <param name="allowScriptAccess" value="sameDomain" />
								    <param name="movie" value="Mp3.swf?file=themesongs/<?php echo $lin[1]; ?>" />
								    <param name="quality" value="high" />
								    <param name="wmode" value="transparent" />
								    <param name="bgcolor" value="#ffffff" />
								    <embed src="Mp3.swf?file=themesongs/<?php echo $lin[1]; ?>" quality="high" wmode="transparent" bgcolor="#ffffff" width="269" height="56" name="Mp3" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />          
								  </object>
								  <script type="text/javascript" src="ieupdate.js"></script>
									</td>
								</tr>
								<tr><td height="20"></td></tr>
								<tr>
									<td align="center">
										<table cellpadding="0" cellspacing="0">
											<tr>
												<td>
													<table cellpadding="0" cellspacing="0">
														<tr>
															<td align="center">
																<!--<a href="#"><img src="images/download.jpg" border="0"></a>-->
																<a href="download.php?f=<?php echo urlencode($_GET['song']); ?>"><img src="images/download.jpg" alt="Download <?php echo $song; ?> theme song" border="0" /></a>
															</td>
														</tr>
														<tr>
															<td align="center">
																<!--<a href="#" class="download">Download</a>-->
																<a href="download.php?f=<?php echo urlencode($_GET['song']); ?>" class="download">Download</a>
															</td>
														</tr>
													</table>
												</td>
												<td width="20"></td>
												<td>
													<table cellpadding="0" cellspacing="0">
														<tr>
															<td align="center">
																<!--<a href="#"><img src="images/email.jpg" border="0"></a>-->
																<!-- <a href="email.php?song=<?php //echo urlencode($_GET['song']); ?>"><img src="images/email.jpg" alt="Email <?php //echo $song; ?> to a Friend" border="0" /></a> -->
																<a onclick="EmailSong.displayEmailContainer('<?php echo base64_encode($_GET['song']); ?>')" href="javascript: void(0)"><img src="images/email.jpg" alt="Email <?php echo $song; ?> to a Friend" border="0" /></a>
																
															</td>
														</tr>
														<tr>
															<td align="center">
																<!--<a href="#" class="download">Email</a>-->
																<a href="javascript: void(0);" onclick="EmailSong.displayEmailContainer('<?php echo base64_encode($_GET['song']); ?>')" class="download">Email</a>
															</td>
														</tr>
													</table>
												</td>
												<td width="20"></td>
												<td>
													<table cellpadding="0" cellspacing="0">
														<tr>
															<td align="center">
																<!--<a href="#"><img src="images/back.jpg" border="0"></a>-->
																<a href="javascript: history.go(-1)"><img src="images/back.jpg" border="0"></a>
															</td>
														</tr>
														<tr>
															<td align="center">
																<!--<a href="#" class="download">Back</a>-->
																<a href="javascript: history.go(-1)" class="download">Back</a>
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr><td height="20"></td></tr>
								<tr>
									<td align="center">
										<!--<a href="#" class="get_song">Get this song as a Ringtore</a>-->
										<img src="images/phone_left.gif" alt="" width="16" height="17" /><a href="http://www.ringtones-space.com/ttunes.php?sid=z-ttunes" class="get_song" onClick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" target="_blank"><span class="style4">Send this Song to your Cell as a Ringtone</span></a>									<span class="style4"><img src="images/phone__right.gif" alt="" width="16" height="17" /></span></td>
						  </tr>
								<tr><td height="20"></td></tr>
								<tr>
									<td align="center">
										<table cellpadding="0" cellspacing="0" border="0">
											<tr>
												<td>
													<!--<a href="#"><img src="images/paypal.jpg" border="0"></a>-->
													<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="<?php echo ABS_URL; ?>images/paypal.jpg" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH6QYJKoZIhvcNAQcEoIIH2jCCB9YCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYB62M1OOhk0t/XSk39FFpYHVMVdt6wt8meWkzxW/uzmFmUgNUhouFHe+IsxpXcwLt7VYx2a41NatD96IATMjGUmr2ek2nrOofNCZVPPTu2jrRRE095wY56LjT2s0+l82dQ05KAIEWqDl6Ex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HQUJXKZ0O5eCWiFcJxqEOdRjRdQuHxzq0vksd9D2/4yoCvCdolGLgG26yQDDKRVtUImemBTwvfWByRN5T2hIbJCo6jB0UwzuthACDE4JSrvPFg98wOqZ/MsfAOIFI0/jKj4xBCOdNevmKsW0cBimkLvqkhw==-----END PKCS7-----
">
</form>
												</td>
												<td width="10"></td>
												<td class="enjoy">If you enjoy<br> TelevisionTunes.com,<br> please support it<br> with a donation.</td>
											</tr>
										</table>
									</td> 
								</tr>
							</table>
					</td>
					<td width="48%" valign="top">
						<div id="emailContainer" style="display: none;"></div>
						<p>
						<?php include('blocks/ads_mediumRectangle.php');?>
						<br />
						<strong>Newest Songs </strong><br />
							<select name="lsongs" onchange="document.location.href=this.options[this.selectedIndex].value">
							<?php
							$res = mysql_query("SELECT file_name, file_title FROM bj_audio ORDER BY date_added DESC LIMIT 30");
							if ($res !== FALSE && mysql_num_rows($res)) {
								while($lin = mysql_fetch_assoc($res)) {
									echo '<option value="' . utils::create_href($lin['file_title']) . '">' . htmlspecialchars(str_replace('.mp3', '', $lin['file_name'])) . '</option>';
								}
								mysql_free_result($res);
							}
							?>
							</select>
							<br />
						</p>
							<?php include('blocks/index.php'); ?>
							
					</td>
				</tr>
			</table>
		</div><!-- content-wrap ends here -->
	</div>
	<!-- footer starts here -->
	<div id="footer">
		<?php include('blocks/footer.php'); ?>
	</div>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
</body>
</html>